Previous Book Contents Book Index Next

Inside Macintosh: QuickDraw GX Objects /
Chapter 4 - Colors and Color-Related Objects / Colors and Color-Related Objects Reference
Color Set Functions / Creating and Manipulating Color Set Objects


GXGetDefaultColorSet

You can use the GXGetDefaultColorSet function to obtain a reference to the default color set object for a given pixel depth.

gxColorSet GXGetDefaultColorSet(long pixelDepth);
pixelDepth
The pixel size of the color set.
function result
A reference to the default color set with the specified pixel depth.
DESCRIPTION
Note that the return value of this function is a reference to the actual default color set object, not a copy of it. If you edit the color set returned by this function, you alter the actual default object that the system uses when creating new color set objects.

The valid values for pixelDepth are 1, 2, 4, and 8. Bitmaps with other pixel depths cannot use indexed color space.

You can also alter a default color set object using the GXSetDefaultColorSet function, described in the next section.

ERRORS, WARNINGS, AND NOTICES
Errors 
out_of_memory 
invalid_pixelSize(debugging version)
SEE ALSO
Default color set objects are discussed in the section "Default Color Sets" on page 4-34. To modify a default color set object, use the GXSetDefaultColorSet function, described next.

To create a new color set object, use the GXNewColorSet function, described on page 4-64.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996